#!/usr/bin/perl -w

package clreqd_modules;

use strict;
use lvm;
use clreq;
use clreqdxml;
use Sys::Hostname;
use Data::Dumper;

#########################################################################
# This is the code that allows a node to attempt to connect to		#
# another specified node - it is typically used when testing 		#
# testing connectivity to new nodes to add to the cluster.		#
#########################################################################

sub help {
my %ARGS=@_;

	my $W=10;
	for my $ckey (keys %::REQUESTS) {
		if((my $xx=length($ckey)) > $W) {
			$W=$xx;
		}
	}
	my @T=();
	for my $ckey (sort keys %::REQUESTS) {
		my $l=sprintf("%-${W}s  %s",$ckey,$::REQUESTS{$ckey}->{text});
		push @T,$l;
		push @T,sprintf("%-${W}s  Mandatory Parameters: " . $::REQUESTS{$ckey}->{mandatory},"");
		push @T,sprintf("%-${W}s  Optional Parameters : " . $::REQUESTS{$ckey}->{optional},"");
		push @T,"";
	}
	
	return "OK_RAWOUT\n".join("\n",@T);
}

1;
